<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>成交员中心</title>
    <link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">
</head>
<body class="bg-gray-100">
    <div class="max-w-md mx-auto bg-white min-h-screen">
        <header class="bg-green-600 text-white p-4">
            <h1 class="text-xl font-bold">成交员中心</h1>
        </header>
        
        <div class="p-4">
            <div class="bg-green-50 rounded-lg p-4 mb-4">
                <div class="flex justify-between items-center mb-2">
                    <span class="text-gray-600">今日核销</span>
                    <span class="text-xl font-bold text-green-600">0单</span>
                </div>
                <div class="flex justify-between text-sm text-gray-500">
                    <span>本月核销：0单</span>
                    <span>总核销：0单</span>
                </div>
            </div>
            
           
            
            <!-- 优惠券管理 -->
            <div class="mb-6">
                <div class="bg-white rounded-lg shadow p-4 mb-4">
                    <div class="text-lg font-bold mb-3">我的优惠券</div>
                    <div class="bg-gradient-to-r from-purple-400 to-pink-400 rounded-lg p-4 text-white mb-3">
                        <div class="flex justify-between items-center">
                            <div>
                                <div class="text-2xl font-bold">¥50</div>
                                <div class="text-sm opacity-90">专属优惠券</div>
                            </div>
                            <div class="text-right">
                                <div class="text-sm">券码：VIP2024001</div>
                                <div class="text-xs opacity-90">有效期至：2024-12-31</div>
                            </div>
                        </div>
                    </div>
                    
                    <div class="space-y-3">
                        <button class="w-full bg-blue-600 text-white py-3 rounded-lg flex items-center justify-center" onclick="generateQRCode()">
                            <svg class="w-6 h-6 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8.684 13.342C8.886 12.938 9 12.482 9 12c0-.482-.114-.938-.316-1.342m0 2.684a3 3 0 110-2.684m0 2.684l6.632 3.316m-6.632-6l6.632-3.316m0 0a3 3 0 105.367-2.684 3 3 0 00-5.367 2.684zm0 9.316a3 3 0 105.368 2.684 3 3 0 00-5.368-2.684z"/>
                            </svg>
                            生成推广二维码
                        </button>
                        
                        <button class="w-full bg-green-600 text-white py-3 rounded-lg flex items-center justify-center" onclick="bindCustomer()">
                            <svg class="w-6 h-6 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197m13.5-9a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0z"/>
                            </svg>
                            绑定客户关系
                        </button>
                        
                        <div class="text-sm text-gray-500 text-center">佣金比例：3% | 已绑定客户：12人</div>
                    </div>
                </div>
            </div>

            <div class="space-y-4">
                <div class="flex items-center justify-between p-3 bg-gray-50 rounded-lg">
                    <div class="flex items-center">
                        <svg class="w-6 h-6 text-green-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"/>
                        </svg>
                        <span class="ml-3">成交记录</span>
                    </div>
                    <svg class="w-5 h-5 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                        <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"/>
                    </svg>
                </div>

                <div class="flex items-center justify-between p-3 bg-gray-50 rounded-lg" onclick="showCouponDetails()">
                    <div class="flex items-center">
                        <svg class="w-6 h-6 text-green-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 5v2m0 4v2m0 4v2M5 5a2 2 0 00-2 2v3a2 2 0 110 4v3a2 2 0 002 2h14a2 2 0 002-2v-3a2 2 0 110-4V7a2 2 0 00-2-2H5z"/>
                        </svg>
                        <div class="ml-3">
                            <div>优惠券记录</div>
                            <div class="text-xs text-gray-500">已使用：8张 | 剩余：2张</div>
                        </div>
                    </div>
                    <svg class="w-5 h-5 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                        <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"/>
                    </svg>
                </div>
                
                <div class="flex items-center justify-between p-3 bg-gray-50 rounded-lg" onclick="showBindingRecords()">
                    <div class="flex items-center">
                        <svg class="w-6 h-6 text-green-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z"/>
                        </svg>
                        <div class="ml-3">
                            <div>客户绑定记录</div>
                            <div class="text-xs text-gray-500">本月新增：3人 | 总计：12人</div>
                        </div>
                    </div>
                    <svg class="w-5 h-5 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                        <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"/>
                    </svg>
                </div>
                
                <div class="flex items-center justify-between p-3 bg-gray-50 rounded-lg">
                    <div class="flex items-center">
                        <svg class="w-6 h-6 text-green-600" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                            <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"/>
                        </svg>
                        <span class="ml-3">个人信息（个人中心）</span>
                    </div>
                    <svg class="w-5 h-5 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                        <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"/>
                    </svg>
                </div>
            </div>
        </div>
    </div>
    <script>
        // 生成推广二维码
        function generateQRCode() {
            // 模拟生成二维码
            alert('正在生成推广二维码...\n\n二维码包含：\n- 成交员ID: VF001\n- 优惠券码: VIP2024001\n- 佣金比例: 3%\n\n客户扫码后将自动绑定关系并获得优惠券');
        }
        
        // 绑定客户关系
        function bindCustomer() {
            const customerPhone = prompt('请输入客户手机号码进行绑定：');
            if (customerPhone && customerPhone.length === 11) {
                alert(`客户 ${customerPhone} 绑定成功！\n\n绑定信息：\n- 客户手机：${customerPhone}\n- 绑定时间：${new Date().toLocaleString()}\n- 优惠券：¥50已发放\n- 佣金比例：3%`);
                // 更新绑定客户数量
                updateBindingCount();
            } else {
                alert('请输入正确的手机号码');
            }
        }
        
        // 显示优惠券详情
        function showCouponDetails() {
            alert('优惠券使用记录：\n\n已使用优惠券：\n1. 订单#001 - ¥50 - 2024-01-15\n2. 订单#002 - ¥30 - 2024-01-20\n3. 订单#003 - ¥20 - 2024-01-25\n\n剩余优惠券：\n1. ¥50优惠券 - 有效期至2024-12-31\n2. ¥30优惠券 - 有效期至2024-11-30');
        }
        
        // 显示客户绑定记录
        function showBindingRecords() {
            alert('客户绑定记录：\n\n本月新增客户：\n1. 138****8888 - 2024-01-10\n2. 139****9999 - 2024-01-15\n3. 137****7777 - 2024-01-20\n\n历史绑定客户：12人\n累计订单：45单\n累计佣金：¥1,350');
        }
        
        // 更新绑定客户数量
        function updateBindingCount() {
            // 这里可以实际更新页面上的数字
            console.log('客户绑定数量已更新');
        }
    </script>
</body>
</html>